<%--
  Created by IntelliJ IDEA.
  User: 18306
  Date: 2020/11/4
  Time: 17:12
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<% String path = request.getContextPath(); %>

<!DOCTYPE HTML>
<html xmlns:wb="http://open.weibo.com/wb"><head>
    <script type="text/javascript" async="" src="/static/js/conversion.js"></script><script src="/static/js/allmobilize.min.js" charset="utf-8" id="allmobilize"></script><style type="text/css"></style>
    <meta content="no-siteapp" http-equiv="Cache-Control">
    <link  media="handheld" rel="alternate">
    <!-- end 云适配 -->
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
    <title>公司产品-招聘服务-拉勾网-最专业的互联网招聘平台</title>
    <meta content="23635710066417756375" property="qc:admins">
    <meta name="description" content="拉勾网是3W旗下的互联网领域垂直招聘网站,互联网职业机会尽在拉勾网">
    <meta name="keywords" content="拉勾,拉勾网,拉勾招聘,拉钩, 拉钩网 ,互联网招聘,拉勾互联网招聘, 移动互联网招聘, 垂直互联网招聘, 微信招聘, 微博招聘, 拉勾官网, 拉勾百科,跳槽, 高薪职位, 互联网圈子, IT招聘, 职场招聘, 猎头招聘,O2O招聘, LBS招聘, 社交招聘, 校园招聘, 校招,社会招聘,社招">
    <meta content="QIQ6KC1oZ6" name="baidu-site-verification">

    <!-- <div class="web_root"  style="display:none">http://www.lagou.com</div> -->
    <script type="text/javascript">
        var ctx = "http://www.lagou.com";
        // console.log("1");
    </script>
    <link href="http://www.lagou.com/images/favicon.ico" rel="Shortcut Icon">
    <link href="/static/css/style.css" type="text/css" rel="stylesheet">
    <link href="/static/css/external.min.css" type="text/css" rel="stylesheet">
    <link href="/static/css/popup.css" type="text/css" rel="stylesheet">
    <script type="text/javascript" src="/static/js/jquery.1.10.1.min.js"></script>
    <script src="/static/js/jquery.lib.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="/static/js/ajaxfileupload.js"></script>
    <script src="/static/js/additional-methods.js" type="text/javascript"></script>
    <!--[if lte IE 8]>
    <script type="text/javascript" src="/static/js/excanvas.js"></script>
    <![endif]-->
    <script type="text/javascript">
        var youdao_conv_id = 271546;
    </script>
    <script src="/static/js/conv.js" type="text/javascript"></script>
    <script src="/static/js/ajaxCross.json" charset="UTF-8"></script></head>


<style type="text/css">
    /*input[type="submit"]{*/
    /*    outline: none;*/
    /*    border-radius: 5px;*/
    /*    cursor: pointer;*/
    /*    background-color: #31B0D5;*/
    /*    border: none;*/
    /*    width: 70px;*/
    /*    height: 35px;*/
    /*    font-size: 20px;*/
    /*}*/

    /*form{*/
    /*    position: relative;*/
    /*    width: 200px;*/
    /*    height: 200px;*/
    /*}*/
    input[type="file"]{
        position: absolute;
        left: 0;
        top: 0;
        height: 200px;
        opacity: 0;
        cursor: pointer;
    }
</style>
<body>
<%--<div id="body">--%>
<%--    <div id="header">--%>
<%--        <div class="wrapper">--%>
<%--            <a class="logo" href="index.html">--%>
<%--                <img width="229" height="43" alt="拉勾招聘-专注互联网招聘" src="/static/images/logo.png">--%>
<%--            </a>--%>
<%--            <ul id="navheader" class="reset">--%>
<%--                <li><a href="index.html">首页</a></li>--%>
<%--                <li class="current"><a href="companylist.html">公司</a></li>--%>
<%--                <li><a target="_blank" href="">论坛</a></li>--%>
<%--                <li>--%>
<%--                    <a rel="nofollow" href="">简历管理</a>--%>
<%--                </li>--%>
<%--                <li><a rel="nofollow" href="create.html">发布职位</a></li>--%>
<%--            </ul>--%>
<%--            <dl class="collapsible_menu">--%>
<%--                <dt>--%>
<%--                    <span>jason&nbsp;</span>--%>
<%--                    <span class="red dn" id="noticeDot-1"></span>--%>
<%--                    <i></i>--%>
<%--                </dt>--%>
<%--                <dd><a href="positions.html">我发布的职位</a></dd>--%>
<%--                <dd><a href="positions.html">我收到的简历</a></dd>--%>
<%--                <dd class="btm"><a href="myhome.html">我的公司主页</a></dd>--%>
<%--                <dd><a href="jianli.html">我要找工作</a></dd>--%>
<%--                <dd><a href="accountBind.html">帐号设置</a></dd>--%>
<%--                <dd class="logout"><a rel="nofollow" href="login.html">退出</a></dd>--%>
<%--            </dl>--%>
<%--        </div>--%>
<%--    </div><!-- end #header -->--%>
    <div id="container">

        <div class="content_mid">
            <dl class="c_section c_section_mid">
                <dt>
                    <h2><em></em>公司申请信息填写</h2>
<%--                    <a class="c_addjob" href="create.html"><i></i>发布新职位</a>--%>
                </dt>
                <dd>
                    <div class="c_text">目标明确、前途光明的产品是吸引求职者的制胜法宝哦！</div>
                    <img width="668" height="56" class="c_steps" alt="第四步" src="/static/images/step4.png">

                    <form method="post" action="/bossmanage/addcheckinfo" id="form" enctype="multipart/form-data">
                        <div id="productDiv">
                            <div class="formWrapper">
                                <h3>公司名称</h3>
                                <input type="text" placeholder="请输入营业执照上的公司名" name="name" id="companyname">
                                <span style="display:none;" id="companyNameError" class="error">请输入正确的公司名格式</span>
                                <h3>公司法人</h3>
                                <input type="text" placeholder="请输入公司法人名字" name="legalperson" id="legalName">
                                <span style="display:none;" id="legalError" class="error">只能为汉字</span>
                               <h3>公司营业执照</h3>
                                <div class="new_product mt20" style="border: 3px solid grey;">
                                    <img src="/static/images/company.png" alt="" width="100%" height="100%" id="prevView">
                                    <input type="file" name="file" id="filePic" value="" onchange="prev(this)"/>
                                    <span style="display:none;" id="companyPicError" class="error">未上传公司营业执照</span>
                                </div>
                            </div>
                        </div>

                        <div class="clear"></div>
                        <input type="button" value="提交审核" id="submitCheck" class="btn_big fr">

                    </form>
                </dd>
            </dl>
        </div>

        <script src="/static/js/step4.min.js" type="text/javascript"></script>
        <div class="clear"></div>
        <input type="hidden" value="8f79f658e49846ae89d90a3f1590f12e" id="resubmitToken">
        <a rel="nofollow" title="回到顶部" id="backtop" style="display: none;"></a>
    </div><!-- end #container -->
</div><!-- end #body -->
<div id="footer">
    <div class="wrapper">
        <a rel="nofollow" target="_blank" href="about.html">联系我们</a>
        <a target="_blank" href="http://www.lagou.com/af/zhaopin.html">互联网公司导航</a>
        <a rel="nofollow" target="_blank" href="http://e.weibo.com/lagou720">拉勾微博</a>
        <a rel="nofollow" href="javascript:void(0)" class="footer_qr">拉勾微信<i></i></a>
        <div class="copyright">&copy;2013-2014 Lagou <a href="http://www.miitbeian.gov.cn/state/outPortal/loginPortal.action" target="_blank">京ICP备14023790号-2</a></div>
    </div>
</div>

<script src="/static/js/core.min.js" type="text/javascript"></script>
<script src="/static/js/popup.min.js" type="text/javascript"></script>

<!--  -->


<div id="cboxOverlay" style="display: none;"></div><div id="colorbox" class="" role="dialog" tabindex="-1" style="display: none;"><div id="cboxWrapper"><div><div id="cboxTopLeft" style="float: left;"></div><div id="cboxTopCenter" style="float: left;"></div><div id="cboxTopRight" style="float: left;"></div></div><div style="clear: left;"><div id="cboxMiddleLeft" style="float: left;"></div><div id="cboxContent" style="float: left;"><div id="cboxTitle" style="float: left;"></div><div id="cboxCurrent" style="float: left;"></div><button type="button" id="cboxPrevious"></button><button type="button" id="cboxNext"></button><button id="cboxSlideshow"></button><div id="cboxLoadingOverlay" style="float: left;"></div><div id="cboxLoadingGraphic" style="float: left;"></div></div><div id="cboxMiddleRight" style="float: left;"></div></div><div style="clear: left;"><div id="cboxBottomLeft" style="float: left;"></div><div id="cboxBottomCenter" style="float: left;"></div><div id="cboxBottomRight" style="float: left;"></div></div></div><div style="position: absolute; width: 9999px; visibility: hidden; display: none;"></div></div></body></html>

<script type="text/javascript">
    function prev(event){
        $("#companyPicError").css("display","none");
        //获取展示图片的区域
        var img = document.getElementById("prevView");
        //获取文件对象
        let file = event.files[0];
        //获取文件阅读器
        let reader = new FileReader();
        reader.readAsDataURL(file);
        reader.onload = function(){
            //给img的src设置图片url
            img.setAttribute("src", this.result);
        }
        //判断是不是图片格式
        var patrn = /^.+\.(jpg|jpeg|bmp|gif|png)$/;
        if(!patrn.exec(file.name)){
            $("#companyPicError").css("display","block");
            $("#companyPicError").html("类型必须是.gif,jpeg,jpg,png中某种");
            return;
        }else{
            $("#companyPicError").css("display","none");
        }
        //判断图片的大小是否符合
        if($("#filePic")[0].files[0].size<1024*10||$("#filePic")[0].files[0].size>1024*100){
            $("#companyPicError").css("display","block");
            $("#companyPicError").html("上传文件的大小不能低于10k大于100k");
            return ;
        }else{
            $("#companyPicError").css("display","none");
        }

    }
    //判定公司名字是否符合规范
    $("#companyname").blur(testCompanyName);
    function testCompanyName(){
        var name = $("#companyname").val();
        var regExp= /^[\(\)\（\）\u4E00-\u9FA5]+$/;
        if(regExp.test(name)){
            $("#companyNameError").css("display","none");
            return true;
        }else{
            $("#companyNameError").css("display","block");
            return false;
        }
    }
    //判断企业法人的名字是否符合规范
     $("#legalName").blur(testLegalName);
     function testLegalName(){
        var legalName = $("#legalName").val();
        var regExp = /^[\u4E00-\u9FA5]+$/;
        if(regExp.test(legalName)){
            $("#legalError").css("display","none");
            return true;
        }else{
            $("#legalError").css("display","block");
            return false;
        }
    }
    //判断是否选择了企业执照
    function testCompany(){
         if($("#prevView").attr("src")=="/static/images/company.png"){
             $("#companyPicError").css("display","block");
             return false;
         }else{
             let file = $("#filePic")[0].files[0];
             var patrn = /^.+\.(jpg|jpeg|bmp|gif|png)$/;
             //判断文件是不是符合图片格式
             if(!patrn.exec(file.name)){
                 $("#companyPicError").css("display","block");
                 $("#companyPicError").html("类型必须是.gif,jpeg,jpg,png中某种");
                 return false;
             }else{
                 $("#companyPicError").css("display","none");
                 //判断文件是否是图片和大小是否合适

                 if($("#filePic")[0].files[0].size<1024*10||$("#filePic")[0].files[0].size>1024*100){
                     $("#companyPicError").css("display","block");
                     $("#companyPicError").html("上传文件的大小不能低于10k大于100k");
                     return false;
                 }else{
                     $("#logoError").css("display","none");
                     return  true;
                 }
             }
         }
    }
    //
    //提交公司的审核信息
    $("#submitCheck").click(function () {
        if(testCompanyName()){
        }else{
            return;
        }
        if(testLegalName()){
        }else{
            return;
        }
        if(testCompany()){}else{
            return;
        }
        $("#form").submit();
    });



</script>